<template>
  <div>
    <el-option
      v-for="item of list"
      :key="item.powerCode"
      v-loading="listLoading"
      :label="item.powerName"
      :value="item.powerValue"
    />
  </div>
</template>

<script>
import { getPower } from '@/api/table'
export default {
  name: 'GetPower',
  data() {
    return {
      list: [],
      listLoading: true
    }
  },
  created() {
    this.getPowers()
  },
  methods: {
    getPowers() {
      this.listLoading = true
      getPower().then(res => {
        console.log(res)
        const data = res.data
        this.list = data.list
      })
      this.listLoading = false
    }
  }
}
</script>
